<!DOCTYPE html>
<html>

<head>
    <title></title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="../bootstrap-5.1.3-dist/css/bootstrap.css" rel="stylesheet">
    <script src="../bootstrap-5.1.3-dist/js/bootstrap.bundle.min.js"></script>
</head>

<body class="container">
    <h3 class="mb-4">一个触发器切换多个目标</h3>
    <p>
        <button class="btn btn-primary" type="button" data-bs-toggle="collapse"
            data-bs-target=".multi-collapse">切换下面3个目标</button>
    </p>
    <div class="collapse multi-collapse">
        <div class="card card-body">
            折叠内容一
        </div>
    </div>
    <div class="collapse multi-collapse">
        <div class="card card-body">
            折叠内容二
        </div>
    </div>
    <div class="collapse multi-collapse">
        <div class="card card-body">
            折叠内容三
        </div>
    </div>
    <hr class="my-4">
    <h3 class="mb-4">多个触发器切换一个目标</h3>
    <p>
        <button class="btn btn-primary" type="button" data-bs-toggle="collapse"
            data-bs-target="#multi-collapse">触发器1</button>
        <button class="btn btn-primary" type="button" data-bs-toggle="collapse"
            data-bs-target="#multi-collapse">触发器2</button>
    </p>
    <div class="collapse" id="multi-collapse">
        <div class="card card-body">
            多个触发器触发的内容
        </div>
    </div>

</body>

</html>